package com.example.server.web.domain;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * <p>
 * 
 * </p>
 *
 * @author 作者
 * @since 2023-04-10
 */
@Getter
@Setter
@ApiModel(value = "Questionnaire对象", description = "")
public class Questionnaire implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "问卷id",required = false)
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    /**
     * 关联课程id
     */
    private Long cctId;

    @ApiModelProperty(value = "班级id",required = true)
    @NotNull(message="班级id不能为空")
    private Long classId;

    @ApiModelProperty(value = "班级名称",required = false)
    private String className;

    @ApiModelProperty(value = "关联课程id（不是课程）",required = true)
    @NotNull(message="课程id不能为空")
    private Long courseId;

    @ApiModelProperty(value = "课程名称",required = false)
    private String courseName;

    @ApiModelProperty(value = "问卷名称",required = true)
    @NotBlank(message="问卷名称不能为空")
    private String questionnaireName;

    @ApiModelProperty(value = "年度",required = false)
    private String year;

    @ApiModelProperty(value = "参与评测的人数",required = false)
    private Integer joinSum;

    @ApiModelProperty(value = "完成评测的人数",required = false)
    private Integer completeSum;

    @ApiModelProperty(value = "评测状态（1代表已完成评教，0代表未完成评教）",required = false)
    private String evalStatus;

    @ApiModelProperty(value = "问卷创建时间",required = false)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime createByTime;

    @ApiModelProperty(value = "创建问卷用户id",required = false)
    private Long createById;


}
